package com.ncepu.clubmanagement.service;

import com.ncepu.clubmanagement.exception.FileUploadException;
import com.ncepu.clubmanagement.exception.PasswordUnsafeException;
import com.ncepu.clubmanagement.pojo.*;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;


public interface PersonService {
    Person login(Person person);

    void register(Person person) throws PasswordUnsafeException;

    PersonWithSchoolName getInfoByAccount(String account);

    // 返回null表示更新失败
    String updateHeadImage(String account, MultipartFile headImage) throws FileUploadException, Exception;

    PermissionOfFourLevel getPermissionOfFourLevel(String account);

    PermissionOfThreeLevel getPermissionOfThreeLevel(Integer id);

    void modifyPersonInfo(Person person);

    List<BasePerson> getAllBasePersonInfoByUserName(String name);

    Boolean isHaveImage(String account);

    boolean modifySelfPassword(String account, String password, String newPassword) throws Exception;

    PageBean getPersonBasicInfoList(Integer page, Integer pageSize, Integer clubId, String userName);

    PageBean getManagedPersonBasicInfoList(Integer page, Integer pageSize, String userName, Integer personId);

    void resetPassword(Integer personId);

    boolean checkIsManaged(Integer sourcePersonId, Integer targetPersonId);


    PersonFontOfGetDetail getPersonInfoWithoutPassword(Integer targetPersonId);
}
